<template>
  <div class="app-container" style="font-size:12px">
    <el-table :key="tableKey" v-loading="listLoading" :data="first_data" size="mini" border fit highlight-current-row style="width: 100%;">
          <el-table-column label="时点" align="center" >
            <template slot-scope="{row}">
              <span>{{ row.month }}</span>
            </template>
          </el-table-column>

          <el-table-column label="累计放款笔数" align="center">
            <template slot-scope="{row}">
              <span>{{ row.month_end_number }}</span>
            </template>
          </el-table-column>

          <el-table-column label="累计放款金额" align="center">
            <template slot-scope="{row}">
              <span>{{ row.month_end_total_money }}</span>
            </template>
          </el-table-column>

          <el-table-column label="时点余额" align="center">
            <template slot-scope="{row}">
              <span>{{ row.month_end_benjin }}</span>
            </template>
          </el-table-column>

          <el-table-column label="逾期0+金额" align="center">
            <template slot-scope="{row}">
              <span>{{ row.benjin0 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="逾期0+逾期率" align="center">
            <template slot-scope="{row}">
              <span>{{ row.rate0 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="逾期金额30+" align="center">
            <template slot-scope="{row}">
              <span>{{ row.benjin1 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="30+逾期率" align="center">
            <template slot-scope="{row}">
              <span>{{ row.rate1 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="逾期金额60+" align="center">
            <template slot-scope="{row}">
              <span>{{ row.benjin2 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="60+逾期率" align="center">
            <template slot-scope="{row}">
              <span>{{ row.rate2 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="逾期金额90+" align="center" width="120">
            <template slot-scope="{row}">
              <span>{{ row.benjin3 }}</span>
            </template>
          </el-table-column>
          <el-table-column label="90+逾期率" align="center"  width="120">
            <template slot-scope="{row}">
              <span>{{ row.rate3 }}</span>
            </template>
          </el-table-column>
          
      </el-table>
  </div>
</template>

<script>
import {
  financeExcelOverDue
} from '@/api/finance_excel'
import waves from '@/directive/waves' // waves directive

import Pagination from '@/components/Pagination' // secondary package based on el-pagination
export default {
  name: 'ReceiveTable',
  components: {
    Pagination
  },
  directives: {
    waves
  },
  data() {
    return {
      listLoading: true,
      tableKey: 0,
      activeName: 'first',
      first_data:[],
    }
  },

  created(){
    this.financeExcelOverDue()
  },
  methods: {
   
    //数据
    financeExcelOverDue(){
      financeExcelOverDue().then(response => {
        this.listLoading = false
        this.first_data = response.data
      })
    },
   
    //导出
    excelout() {
      merchantdayexcelout(this.infoQuery).then(response => {
        this.listLoading = false
        const filepath = response.data.path
        window.location.href = filepath
      })
    },

  }
}
</script>

<style>
</style>
